package lijunyan;

public abstract class Random
{
    static private java.util.Random random=new java.util.Random();
    static public String getRandomString(int length)
    {
        String str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        StringBuffer sb=new StringBuffer();
        for(int i=0;i<length;i++)
        {
            int number=random.nextInt(str.length());
            sb.append(str.charAt(number));
        }
        return sb.toString();
    }
    static public int getRandomInt(int n)
    {
        return random.nextInt(n);
    }
}
